package com.queming.service.General;

import com.queming.core.dto.BaseDto;
import com.queming.core.entity.AbstractEntity;
import com.queming.core.exception.ExceptionType;
import com.queming.core.mapper.MapperInterface;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 *
 * @author 陈词调
 * @date 2022/5/7
 */
public interface GeneralService<Entity extends AbstractEntity,Dto extends BaseDto> {
      JpaRepository<Entity,String> getRepository();

      MapperInterface<Entity,Dto> getMapper();

      ExceptionType getNotFoundExceptionType();
      Dto create(Dto dto);

      Dto get(String id);

      Dto update(String id,Dto dto);

      void delete(String id);

}
